﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Worktool
{
    public partial class dbSelect : Form
    {
        string datenbank = "";
        
        public dbSelect()
        {
            InitializeComponent();
            button1.Enabled = false;

        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            datenbank = comboBox1.Text;
            button1.Enabled = true;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (comboBox1.Text == "Quantum")
            {
                Properties.Settings.Default.CurrentConnectionString = Properties.Settings.Default.ASCConnectionString;
                Properties.Settings.Default.CurrentDBName = "Quantum";
                Properties.Settings.Default.Save();
                this.Close();

                
            }
            if (comboBox1.Text == "Anthem")
            {
                Properties.Settings.Default.CurrentConnectionString = Properties.Settings.Default.ASC_2ConnectionString;
                Properties.Settings.Default.CurrentDBName = "Anthem";
                Properties.Settings.Default.Save();
                this.Close();

                
            }
        }
    }
}
